Skip to content

[Azure Monitor AspNetCore] Plumb EnableStandardMetrics and EnablePerfCounters#56438

Merged
mattsains-msft merged 3 commits into
Azure:mainfrom
mattsains-msft:distro-config
Feb 24, 2026
Merged

[Azure Monitor AspNetCore] Plumb EnableStandardMetrics and EnablePerfCounters#56438
mattsains-msft merged 3 commits into
Azure:mainfrom
mattsains-msft:distro-config

Conversation

@mattsains-msft
Copy link
Copy Markdown
Member

This adds the recently-made-public config options EnableStandardMetrics and EnablePerfCounters of Azure Monitor Exporter into the AspNetCore distribution.

Copilot AI review requested due to automatic review settings February 24, 2026 18:42
@github-actions github-actions Bot added the Monitor - Distro Monitor OpenTelemetry Distro label Feb 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes the Azure Monitor Exporter configuration flags EnableStandardMetrics and EnablePerfCounters through the Azure.Monitor.OpenTelemetry.AspNetCore distribution, and verifies the values flow through DI configuration into AzureMonitorExporterOptions.

Changes:

  • Added EnableStandardMetrics and EnablePerfCounters to AzureMonitorOptions with default values and XML docs.
  • Plumbed the new option values into AzureMonitorExporterOptions via SetValueToExporterOptions.
  • Added unit tests covering defaults, disabling, and propagation through UseAzureMonitor(...) DI configuration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/AzureMonitorOptions.cs Adds the two public options and copies them into exporter options during configuration.
sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/AzureMonitorOptionsTests.cs Adds tests verifying defaults and end-to-end propagation into AzureMonitorExporterOptions.

Copy link
Copy Markdown
Member

@rajkumar-rangaraj rajkumar-rangaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattsains-msft mattsains-msft enabled auto-merge (squash) February 24, 2026 19:43
@mattsains-msft mattsains-msft merged commit b578135 into Azure:main Feb 24, 2026
22 checks passed
@mattsains-msft mattsains-msft deleted the distro-config branch February 24, 2026 21:27
This was referenced May 1, 2026
This was referenced May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Distro Monitor OpenTelemetry Distro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants